package com.iqiyi.pps.epg.api.server.impl;

import com.iqiyi.pps.epg.api.server.iservice.RecordApiService;
import com.iqiyi.pps.epg.api.server.iservice.VodApiService;
import com.iqiyi.pps.epg.api.server.proxy.RecordProxy;
import com.iqiyi.pps.epg.api.server.proxy.VodProxy;
import com.iqiyi.pps.epg.api.utils.CrossDataLocalPool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.ws.rs.FormParam;

/**
 * Created by karkarrotxu on 2017/7/31.
 */
@Service("recordApiServiceImpl")
public class RecordApiServiceImpl extends ApiServiceImpl implements RecordApiService {

    @Autowired
    private RecordProxy recordProxy;

    @Override
    public String getPlanLibraryList(String paramsObj, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getPlanLibraryList(paramsObj, pageNo, pageSize);
    }

    @Override
    public String getRecordPlan(String entityId) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getRecordPlan(entityId);
    }


    @Override
    public String doPlanSave(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doPlanSave(dataString);
    }

    @Override
    public String doPlanEdit(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doPlanEdit(dataString);
    }

    @Override
    public String doPlanDel(String entityId) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doPlanDel(entityId);
    }

    @Override
    public String getRecordChannelList(String paramsObj, Integer pageNo, Integer pageSize,String dataMode) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getRecordChannelList(paramsObj, pageNo, pageSize,dataMode);
    }

    @Override
    public String getRecordColList(String paramsObj, Integer pageNo, Integer pageSize,String dataMode) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getRecordColList(paramsObj, pageNo, pageSize,dataMode);
    }

    @Override
    public String doChannelSave(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doChannelSave(dataString);
    }

    @Override
    public String doChannelEdit(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doChannelEdit(dataString);
    }

    @Override
    public String doChannelDel(String entityId) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doChannelDel(entityId);
    }

    @Override
    public String doTaskEdit(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doTaskEdit(dataString);
    }

    @Override
    public String getTaskLibraryList(String paramsObj, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getTaskLibraryList(paramsObj, pageNo, pageSize);
    }



    @Override
    public String getSignalLibraryList(String paramsObj, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getSignalLibraryList(paramsObj, pageNo, pageSize);
    }

    @Override
    public String doSignalSave(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doSignalSave(dataString);
    }

    @Override
    public String doSignalDel(String entityId) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doSignalDel(entityId);
    }

    @Override
    public String getRecordSignal(String entityId) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getRecordSignal(entityId);
    }

    @Override
    public String doSignalEdit(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doSignalEdit(dataString);
    }


    @Override
    public String getChannelSignalLibraryList(String paramsObj, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getChannelSignalLibraryList(paramsObj, pageNo, pageSize);
    }

    @Override
    public String doChannelSignalSave(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doChannelSignalSave(dataString);
    }

    @Override
    public String doChannelSignalDel(String entityId) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doChannelSignalDel(entityId);
    }

    @Override
    public String getRecordChannelSignal(String entityId) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getRecordChannelSignal(entityId);
    }

    @Override
    public String doChannelSignalEdit(String dataString) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doChannelSignalEdit(dataString);
    }

    @Override
    public String doChannelSignalStart(String entityId) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doChannelSignalStart(entityId);
    }

    @Override
    public String doChannelSignalStop(String entityId) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.doChannelSignalStop(entityId);
    }
    @Override
    public String getRecordChannelSignalTableList(String paramsObj, Integer pageNo, Integer pageSize) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.getRecordChannelSignalTableList(paramsObj, pageNo, pageSize);
    }

    @Override
    public String updateRecordVideoStatus(Long signalId,Long taskId, Long videoId, Integer videoStatus) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.updateRecordVideoStatus(signalId,taskId, videoId, videoStatus);
    }

    @Override
    public String updateRecordTaskStatus(Long taskId, Integer taskStatus) {
        CrossDataLocalPool.set(getCrossData());
        return recordProxy.updateRecordTaskStatus(taskId,  taskStatus);

    }
}
